package cn.tedu.controller;/**
 * @Author 金帮嘉诚 @Date 2021-07-19 星期一 20:52
 */
/*本类用于测试*/

import cn.tedu.pojo.Emp;
import cn.tedu.service.EmpService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**知识点*/
@RestController
@RequestMapping("/emp/")
public class EmpController {
    @Autowired
    private EmpService empService;

    @CrossOrigin
    @RequestMapping("getAll")
    public List<Emp> getAll(){
        return empService.getAll();
    }
}
